$(function () {
    loadData("四川")
})

//加载饼图数据
function loadData(name) {
    var pie_five = echarts.init(document.getElementById("pie_yiqing"), 'infographic');
    option = {
        tooltip: {
            trigger: 'item',
            formatter: "{a} <br/>{b} : {c} ({d}%)"
        },
        legend: {
            orient: 'vertical',
            left: 'left',
            data: ['现有确诊', '现有治愈', '现有死亡'],
            textStyle: {color: 'balck'}
        },
        series: [
            {
                name: '各省疫情分析',
                type: 'pie',
                radius: '50%',
                data: [
                    {name: '现有确诊', value: 11},
                    {name: '现有治愈', value: 22},
                    {name: '现有死亡', value: 33}
                ],
                emphasis: {
                    itemStyle: {
                        shadowBlur: 10,
                        shadowOffsetX: 0,
                        shadowColor: 'rgba(0, 0, 0, 0.5)'
                    }
                }
            }
        ]
    };
    pie_five.setOption(option);
}
